package com.wish.g04.financial.controller;

import com.wish.g04.common.core.web.controller.BaseController;
import com.wish.g04.common.core.web.domain.AjaxResult;
import com.wish.g04.financial.service.IApplyReviewService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 融资申请审核
 */
@RestController
@RequestMapping("/applyReview")
public class FinancialApplyReviewController extends BaseController {

    @Autowired
    private IApplyReviewService iApplyReviewService;

    @GetMapping("detail/{id}")
    public AjaxResult detail(@PathVariable("id") Long id){
            return iApplyReviewService.zuFangDetail(id);
    }

    @GetMapping("detail2/{id}")
    public AjaxResult detail2(@PathVariable("id") Long id){
        return iApplyReviewService.loans(id);
    }

    @GetMapping("detail3/{id}")
    public AjaxResult detail3(@PathVariable("id") Long id){
        return iApplyReviewService.factor(id);
    }

    @GetMapping("review")
    public AjaxResult detail3(Long id, Integer jrProductType, Integer applyState){
        return iApplyReviewService.review(id,applyState,jrProductType);
    }
}
